//****************************************************************/
//Creation History
// Company: GZ office
// NAME:    SysParam.java
// TITLE:   System parameter 
// BY:      Oscar Bai
// DATE:    2003-03-04
//******************************************************************/
//Modification History
//******************************************************************/
//******************************************************************/


package  admin.system.sysparam;

import com.ffpc.sql.*;

public class SysParam
  extends DataObject 
  implements SysParamBean{


  private String sys_param_name=null;
  private String sys_param_value=null;
  private String sys_param_des=null;
  private String crt_user=null;
  private String crt_date=null;
  private String upd_user=null;
  private String upd_date=null; 

  private Column ColSys_Param_name = null;
  private Column ColSys_Param_value = null;
  private Column ColSys_Param_des = null;
  private Column ColCrt_user = null;
  private Column ColCrt_date = null;
  private Column ColUpd_user = null;
  private Column ColUpd_date = null;

  //Constructor

  public SysParam(){
    ColSys_Param_name=new Column(0,"sys_param_name",Column.Types.string,null,20,false);
    ColSys_Param_value=new Column(0,"sys_param_value",Column.Types.string,null,50,false);
    ColSys_Param_des=new Column(0,"sys_param_des",Column.Types.string,null,100,false);
    ColCrt_user=new Column(0,"crt_user",Column.Types.string,null,10,true);
    ColCrt_date=new Column(0,"crt_date",Column.Types.time,null,10,true);
    ColUpd_user=new Column(0,"upd_user",Column.Types.string,null,10,true);
    ColUpd_date=new Column(0,"upd_date",Column.Types.time,null,10,true);
  }

  @Override
public void setSys_Param_name(String sys_param_name){
    this.sys_param_name=this.setAttribute(ColSys_Param_name,sys_param_name);
  }

  @Override
public String getSys_Param_name(){
    return this.sys_param_name==null?"":this.sys_param_name;
  }
  
  @Override
public void setSys_Param_value(String sys_param_value){
    this.sys_param_value=this.setAttribute(ColSys_Param_value,sys_param_value);
  }

  @Override
public String getSys_Param_value(){
    return this.sys_param_value==null?"":this.sys_param_value;
  }

  @Override
public void setSys_Param_des(String sys_param_des){
    this.sys_param_des=this.setAttribute(ColSys_Param_des,sys_param_des);
  }

  @Override
public String getSys_Param_des(){
    return this.sys_param_des==null?"":this.sys_param_des;
  }

  @Override
public void setCrt_user(String crt_user){
    this.crt_user=this.setAttribute(ColCrt_user,crt_user);
  }

  @Override
public String getCrt_user(){
    return this.crt_user==null?"":this.crt_user;
  }

  @Override
public void setCrt_date(String crt_date){
    this.crt_date=this.setAttribute(ColCrt_date,crt_date);
  }

  @Override
public String getCrt_date(){
    return this.crt_date==null?"":this.crt_date;
  }

  @Override
public void setUpd_user(String upd_user){
    this.upd_user=this.setAttribute(ColUpd_user,upd_user);
  }

  @Override
public String getUpd_user(){
    return this.upd_user==null?"":this.upd_user;
  }

  @Override
public void setUpd_date(String upd_date){
    this.upd_date=this.setAttribute(ColUpd_date,upd_date);
  }

  @Override
public String getUpd_date(){
    return this.upd_date==null?"":this.upd_date;
  }

    // belongs to row interface
  @Override
public Column[] createColumns()
  {
    Column[] cols = new Column[7];
    cols[0] = ColSys_Param_name.clone(null);
    cols[1] = ColSys_Param_value.clone(null);
    cols[2] = ColSys_Param_des.clone(null);
    cols[3] = ColCrt_user.clone(null);
    cols[4] = ColCrt_date.clone(null);
    cols[5] = ColUpd_user.clone(null);
    cols[6] = ColUpd_date.clone(null);
    return cols;
  }

    // super's abstract methods

  @Override
public String getTableName()
  {
    return "jis.jis_s_system_parameter";
  }
  
  @Override
protected String[] getKeyColumnNames()
  {
    String[] list = {"sys_param_name"};
    return list;
  }  

  @Override
protected String[] getUpdatableColumnNames()
  {
    String[] list = {"sys_param_name","sys_param_value","sys_param_des","crt_user","crt_date","upd_user","upd_date"};
    return list;
  }
  
  @Override
protected void retrieveColumnValues()
  {
    this.sys_param_name = this.retrieveColumnValue("sys_param_name");
    this.sys_param_value = this.retrieveColumnValue("sys_param_value");
    this.sys_param_des = this.retrieveColumnValue("sys_param_des");
    this.crt_user = this.retrieveColumnValue("crt_user");
    this.crt_date = this.retrieveColumnValue("crt_date");
    this.upd_user = this.retrieveColumnValue("upd_user");
    this.upd_date = this.retrieveColumnValue("upd_date");
  }
}
  